package com.itfreer.map;

import com.itfreer.core.config.ConfigService;
import com.itfreer.core.config.ConfigManager;
import com.itfreer.gis.api.IMap;
import com.itfreer.metadata.MetaDatabaseHelper;

/**
 * 定义项目级app，用于初始化项目相关参数
 */
public class Application extends com.itfreer.mapbox.Application {

    public void onCreate() {
        super.onCreate();

        // 配置初始化
        ConfigService.instance.init();
        ConfigManager.setConfig("projection", "EPSG:3857");
        ConfigManager.setConfig("zoom", 9D);
        ConfigManager.setConfig("center", new double[] { 26.80, 113.61 });
        ConfigManager.setConfig("fullExtent", new IMap.Extent(26.4,113.30,27.2,113.90));

//        ConfigManager.setConfig("HttpUrl", "http://10.0.2.2:81/");
        ConfigManager.setConfig("HttpUrl", "http://129.211.11.95:81/jtjs/");
        ConfigManager.setConfig("style", "fm://styles/mbstyle/outdoors");

//        ConfigManager.setConfig("style", "mapbox://styles/mapbox/outdoors-v10");

        // sso配置
//        ConfigManager.setConfig("ssoService","http://localhost:4200");
        ConfigManager.setConfig("ssoService","http://129.211.11.95/jtjs");
        ConfigManager.setConfig("DataUpload", true);


        // 模块初始化
        MetaDatabaseHelper.init();
    }
}
